from sqlalchemy import Column, ForeignKey, INTEGER, NCHAR, SMALLINT, BIGINT
from utils.db import Base

MAX_LEN_NAME = 64


class State(Base):
    __tablename__ = "state"

    id = Column(INTEGER, primary_key=True, autoincrement=True)
    name = Column(NCHAR(MAX_LEN_NAME), default="Государство", nullable=False)
    dictator_id = Column(INTEGER,
                         ForeignKey("user.id", use_alter=True), unique=True)
    cash = Column(BIGINT, default=0, nullable=False)
    taxes = Column(SMALLINT, default=0, nullable=False)
